const state = {
    num: 0,
    name: '张三',
    age: '18',
}

const mutations = {
    add(state, n) {
        state.num = state.num + n
    },
}

const actions = {
    add1({ commit }, n) {
        setTimeout(() => {
            commit('add', n)
        }, 1000)
    },
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}